<?php

$userid = get_loggedin_userid();

// Get variables
$name = get_input('name');

$client_id = get_input('client_id');

$result = greengar_rename($userid, $name);
$result = userToArray($result, $client_id, FALSE);
echo json_encode(export_result(200, $result));

?>